package com.lc.user.express.httpserver;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

/**
 * Created by Administrator on 2016/4/13.
 */
@HttpInlet(Net.GET_IS_BALANCE)
public class GetIsBalance extends ZJDBAsyGet<Object> {
    public String userid;
    public String account;

    public GetIsBalance(String userid, String account, AsyCallBack listener) {
        super(listener);
        this.userid = userid;
        this.account = account;
    }

    @Override
    protected Object parser(JSONObject object) {
        if (object.optInt("message") == 1) {
            return "1";
        } else if (object.optInt("message") == 2) {
            return "2";
        } else if (object.optInt("message") == 0) {
            return "0";
        }
        return null;
    }
}
